<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>编辑审批表单</title>
	<#include "/common/resource.ftl">
	<script type="text/javascript">
        $(function () {
            $(".ajax-form2").unbind().submit(function () {
                try {
                    var form = $(this);
                    if (!form.valid()) {
                        $.message("验证不通过，无法提交表单");
                        return false;
                    }

                    form.formSubmit({
                        callBack:function (data) {
                            <#if (params.mobile)??>
                            history.go(-2);
                            </#if>
                        }
                    });
                } catch (e) {
                    console.log("表单提交错误：" + e);
                }
                return false;
            });
        });
	</script>
    <style>
        .layui-input-block{margin-left: 120px;}
        .layui-form-label{width: 90px;}
        input[readonly]{background:#eee;}
    </style>
</head>
<body>
	<div class="ui-form">
		<form class="layui-form ajax-form2" action="${params.contextPath}/web/workflowTask/rejectTask" method="post">
			<input type="hidden" name="taskId" value="${params.taskId!}" />
			<div class="layui-form-item">
                <label class="layui-form-label">审批时间<span class="ui-request">*</span></label>
                <div class="layui-input-block">
                    <input type="text" value="${.now?string('yyyy-MM-dd HH:mm')}" readonly class="layui-input {required:true}"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">驳回原因<span class="ui-request">*</span></label>
                <div class="layui-input-block">
                    <textarea name="remark" placeholder="请输入驳回原因" class="layui-textarea {required:true}" maxlength="500"></textarea>
                </div>
            </div>

			<div class="layui-form-item">
				<div class="layui-input-block">
                    <input type="submit" value="确定" class="layui-btn"/>
				</div>
			</div>
		</form>
	</div>
</body>

</html>
